﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace MobileOSMLib
{
    public interface ITilesProvider
    {

        /// <summary>
        /// Calculates the longitude given a point in tile coordinates system.
        /// </summary>
        /// <param name="tx"> aaa </param>
        /// <param name="ty"> bbb </param>
        /// <param name="zoom">ccc</param>
        /// <returns>ddd</returns>
        double calculateLon(double tx, double ty, int zoom);



        /// <summary>
        ///  Calculates the Latitude given a point in tile coordinates system.
        /// </summary>
        /// <param name="tx"></param>
        /// <param name="ty"></param>
        /// <param name="zoom"></param>
        /// <returns></returns>
        double calculateLat(double tx, double ty, int zoom);



        /// <summary>
        /// Calculates the x map tile coordinate given a point in geographic
        /// coordinates system.
        /// </summary>
        /// <param name="lon"></param>
        /// <param name="lat"></param>
        /// <param name="zoom"></param>
        /// <returns></returns>
        double calculateTileX(double lon, double lat, int zoom);



        /// <summary>
        /// Calculates the y map tile coordinate given a point in geographic
        /// coordinates system.
        /// </summary>
        /// <param name="lon"></param>
        /// <param name="lat"></param>
        /// <param name="zoom"></param>
        /// <returns></returns>
        double calculateTileY(double lon, double lat, int zoom);



        /// <summary>
        /// Returns the maximum zoom level supported by this provider.
        /// </summary>
        /// <returns></returns>
        int getMaxZoom();



        /// <summary>
        /// Requests a map tile with the given coordinates, and a zoom level
        /// </summary>
        /// <param name="tx"></param>
        /// <param name="ty"></param>
        /// <param name="zoom"></param>
        /// <returns></returns>
        Bitmap requestTile(int tx, int ty, int zoom);

    }
}
